package com.example.chatroom.model;

public class User {
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
//按住alt和insert即可生成get和set函数
    private int userId;
    private String username = "";
    private String password = "";
//不重写toString（）方法在System.out.println("登录失败，用户名或密码错误->"+user);
    //时会打印哈希码
    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
